reqsign
Signing API requests without effort.
Most API is simple. But they could be complicated when they are hidden from complex abstraction. reqsign
bring the simple API back: build, sign, send.
Quick Start
use reqsign::services::aws::v4::Signer;
use reqwest::{Client, Request, Url};
use anyhow::Result;
#[tokio::main]
async fn main() -> Result<()>{
let signer = Signer::builder().service("s3").build().await?;
let url = Url::parse( "https://s3.amazonaws.com/testbucket")?;
let mut req = reqwest::Request::new(http::Method::GET, url);
signer.sign(&mut req).await?;
let resp = Client::new().execute(req).await?;
println!("resp got status: {}", resp.status());
Ok(())
}
Features
- Pure rust with minimal dependencies.
- Test again official SDK and services.
Acknowledge
Inspired a lot from aws-sigv4.